<template>
  <div class="page-mobile_distribution_explain">
    <white-header
      :isShowTopNav="true"
      :isShowBack="true"
      :isShowRight="true"
      title="分销说明"
    ></white-header>
    <div class="info" v-html="configInfo.distributionExplain"></div>
  </div>
</template>

<script>
import { getMemberConfig } from "~/api/member";
import { mapState, mapActions, mapMutations } from "vuex";
import WhiteHeader from "~/components/mobile/WhiteHeader.vue";
export default {
  components: {
    WhiteHeader
  },
  scrollToTop: true,
  data() {
    return {
        configInfo:{}
    };
  },
  filters: {
  },
  computed: {
    ...mapState({
      user_info(state) {
        return state.user_info;
      },
      is_loading(state) {
        return state.is_loading;
      },
    }),
  },
  watch: {},
  methods: {
    ...mapMutations(["SET_IS_LOADING"]),
    trimDate(date) {
      if (date) {
        let _date = new Date(date);
        var year = _date.getFullYear();
        var month = _date.getMonth() + 1;
        var date = _date.getDate();
        var hours = _date.getHours();
        var minutes = _date.getMinutes();
        if (month < 10) {
          month = "0" + month;
        }
        if (date < 10) {
          date = "0" + date;
        }
        if (hours < 10) {
          hours = "0" + hours;
        }
        if (minutes < 10) {
          minutes = "0" + minutes;
        }
        return year + "." + month + "." + date + " " + hours + ":" + minutes;
        // return `${_date.getFullYear()}.${_date.getMonth() +
        //   1}.${_date.getDate()} ${_date.getHours()}:${'0'+_date.getMinutes()}`;
      } else {
        return this.$t('locale.mobile.withdrawakLog.t9');
      }
    },
    async getData() {
        this.SET_IS_LOADING(true);
        let result = await getMemberConfig();
        console.log("result", result);
        if (result && result.data && result.data.code == 200) {
            this.configInfo = result.data.data;
        } else {
            
        }
        this.SET_IS_LOADING(false);
    },
  },
  activated() {
    this.getData();
  },
  deactivated() {
  },
  destroyed() {
  },
  created() {
    this.getData();
  },
  mounted() {
  },
};
</script>

<style lang="scss" scoped>
.page-mobile_distribution_explain {
  width: 7.2rem;
  min-height: 100vh;
  background-color: #ffffff;
  .info{
      // border-top: 1px solid #ededf1;
      width: 7.2rem;
      box-sizing: border-box;
      padding: .288rem;
  }
}
</style>
<style lang="scss">

</style>
